﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using MyOA.BLL;
using MyOA.Model;

namespace MyOA.UI.ScheduleManage.PersonNote
{
    public partial class PersonNote : System.Web.UI.Page
    {
        personNoteManage manage = new personNoteManage();
        protected void Page_Load(object sender, EventArgs e)
        {

            if (Session["loginId"] == null)
            {
                Response.Redirect("~/Login.aspx");
                return;

            }
            if (Request.QueryString["NodeValuePath"] == null)
            {
                Response.Redirect("~/Error.html");
                return;
            }
            int nodeId;
            if (int.TryParse(Request.QueryString["NodeValuePath"], out nodeId)==false)
            {
                Response.Redirect("~/Error.html");
                return;
            }
            string loginId = (string)Session["loginId"];
            if (new CommandManage().isHaveRoleRight(loginId, nodeId) == false)
            {
                Response.Redirect("~/Error.html");
                return;
            }
            
        }
    }
}
